home *** CD-ROM | disk | FTP | other *** search
- Path: phoenix.rhein.de!yaps!arno
- From: arno@yaps.rhein.de (Arno Eigenwillig)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Exec Lists once again
- Message-ID: <aiGTx*gXe@yaps.rhein.de>
- Date: Wed, 03 Jan 1996 20:14:02 +0100
- References: <zp0e60aC1XREZf0@pp78hsp.hsp.owl.de>
- Organization: Yet Another Private Site in Meckenheim, Germany
- MIME-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- X-Copyright: This article may not be distributed on a CD-ROM
- or in printed form without prior written consent of the author.
- X-Disclaimer: 30 hours awake now.
- X-Newsreader: Arn V 1.04
-
- In article <zp0e60aC1XREZf0@pp78hsp.hsp.owl.de>, Thomas Eicher writes:
-
- > while (np->ln_Pred != namelist.lh_TailPred)
-
- That is correct.
-
- > while (np! = namelist.lh_Tail)
- while (np != namelist.lh_Tail) I suppose
-
- lh_Tail is always zero. What you really mean ("while np isn't the
- terminating peuso-node") is
-
- while ((APTR)np != (APTR)(&namelist.lh_Tail))
-
- What I personally prefer, though, is
-
- while (np->ln_Succ)
-
- The shorter, the sweeter. ;) And it is a method that even works in
- case you have an only forward-linked list (which is a sensible thing
- in some list sort algorithms: Treat the list as forward-linked and add
- the expensive backward-linking when sorting has finished.)
-
- -- __
- __/// Arno Eigenwillig /\ <arno@yaps.rhein.de> \/ PGP key
- \XX/ V+49-2225-5870 /\ <Arnooo @ #amigager> \/ available
-